1. Field of the Invention
The present invention relates to display processors and, in particular, to computer-implemented processes and apparatuses for processing two or more display streams for display on a single display monitor.
2. Description of the Related Art
It is known to use computer processors for displaying still and motion video images on monitors. It is also known to display graphics such as computer-generated graphics icons, text, or menus along with video images by occluding (i.e., superimposing) the graphics display over portions of the video images.
Referring now to FIG. 1, there is shown a block diagram of a prior art system 100 for simultaneously displaying video images and graphics displays on a monitor 101. As shown in FIG. 1, video frame 103 of a human face 103a is displayed with a graphics display such as graphics display 102 occluding a portion of video frame 103. Graphics display 102 contains computer-generated icons 102a which a user may choose with a mouse to manipulate the video being displayed. As video images are updated, the display graphic may remain displayed on monitor 101 without changing.
To display a video image on a monitor, such as a video frame 103, it is known to store each video frame in a single frame buffer of a memory device 111. For example, to display an [N.times.M] video frame, where each pixel is represented by 16 bits of RGB data, each video frame may be stored in a single frame buffer of size N.times.M with a depth of 16 bits. If the video display is updated with new video frames at a rate of, for example, 15 frames per second, every 15th of a second or so a new video frame is stored in the single frame buffer for display on the monitor.
Where a graphics display such as graphics display 102 is to be displayed along with or "on top of" the video display such that graphics display 102 partially or completely occludes the current video frame 103 of the video, the computer processor or a graphics display controller may store the graphics display in a portion of the single frame buffer corresponding to the portion of the monitor screen where the graphic is to be located.
Video application 110 and graphics applications 109 may run, for example, on a host processor 108. First, video application 110 may store video frame 103 in the single frame buffer 111. Next, graphics application 109 may store graphics display 102 over a portion of video frame 103. A problem arises in the next cycle when video application 109 updates the video display, because graphics display 102 would be overwritten. Thus, graphics display 102 would display for only one cycle, and would only appear as a flash to a user. This problem of a graphics display being overwritten when the video display is updated is known as "clobber".
Referring now to FIG. 2, there is shown a graphical representation of a prior art dual frame buffer 200 used in the system of FIG. 1. It is known to use dual-frame buffer 200 (also known as a single active frame buffer) to display both graphics and video displays on a monitor to avoid the problem of clobber. Dual-frame buffer 200 consists of two single frame buffers: video frame buffer 201 and graphics frame buffer 202. Video frame buffer 201 may be, as discussed above, a 16-bit [N.times.M] buffer for storing individual video frames 103. Since graphics 102 can potentially fill the entire screen of monitor 101, graphics frame buffer 202 is also [N.times.M], but typically has a depth of only 8 bits. A key color is selected that may not be used as a graphics color. Instead, the key color may be used by graphics display controller 106 to determine when to show video pixels from video frame buffer 201 and when to show graphics pixels from graphics frame buffer 202 for a given pixel location. For example, in an 8-bit graphics frame buffer 202, there are 2.sup.8 possible color/intensity combinations for each pixel, one of which can be selected as a key color that may not be used as a graphics color.
A key color in a pixel of graphics frame buffer 202 indicates that pixel location belongs to or is "owned" by the video application. Each pixel of graphics frame buffer 202 except those that correspond to graphics displays contains the key color. For example, the pixels within graphics display 102 in graphics frame buffer 202 may be any color except the selected key color, whereas each pixel of graphics frame buffer 202 outside graphics display 102 contains the key color. After video application 110 stores a new video frame 103 in video frame buffer 201, graphics display controller 106 combines the two buffers' data to display graphics display 102 occluding a portion of new video frame 103. In order to do this, graphics display controller 106 displays a video pixel if graphics frame buffer 203 for the corresponding location contains the key color; otherwise, the graphics pixel is displayed instead. In this manner, through the use of key colors and dual frame buffer 200, clobber is avoided and video and graphics are displayed together. However, use of a dual frame buffer such as dual frame buffer 200 utilizes more memory than a single frame buffer.
Referring now to FIG. 3, there is shown a graphical representation of a prior art single frame buffer 300 used in system 100 of FIG. 1. To avoid the problem of clobber and also avoid the higher use of memory of a dual frame buffer, it is also known to use a bit mask plane 302 with single frame buffer 300. In this implementation, an [N.times.M] single-bit mask plane 302 is used to inform graphics display controller 106 whether or not to update pixels of the single frame buffer 300 when the video and/or graphics displays are updated.
As illustrated in FIG. 3, if single frame buffer 300 is 16 bits deep, the 16th bit of the single frame buffer is typically used to store bit mask plane 302. The other 15 bits of each pixel location are used to store RGB data for each pixel, as illustrated by pixel 301 having mask bit 301a.
For example, at the start of a video display, if all of the pixels are owned by video application 110, then all of the mask bits of mask bit plane 302 will be in "set" condition, indicating that all of the pixels are owned by the video application. As such, each and every pixel in single frame buffer 300 is updated when a new video frame 103 is received. When graphics display 102 is to be displayed over a portion of video frame 103, graphics application 109 first "resets" the mask bits for the pixels where graphics display 102 will be displayed to indicate that those pixels are now owned by graphics application 109. Graphics application 109 then stores graphics display 102 in the appropriate location in single frame buffer 300. When another video frame 103 is generated, graphics display controller 106 updates only those pixels owned by video application 110, in order to avoid the clobber problem wherein any graphic stored in the single frame buffer would be overwritten by the new video frame. Thus, as single frame buffer 300 is repeatedly updated video frames are displayed on the monitor around graphics display 102 but without overwriting or clobbering graphics display 102.
When graphics application 109 wishes to remove graphics display 102 so that the entire video frame 103 is again to be displayed, graphics application 109 sets all the mask bits that were previously reset, so that these pixels will once again be owned by video application 110. As such, when video frame 103 is updated, all the pixels will be owned by video application 110 and the next video frame 103 will overwrite graphics display 102 stored in single frame buffer 300.
One problem with this conventional method of using a mask bit plane 302 within single frame buffer 300 is the delay between (1) the resetting of mask bits to claim ownership for graphics application 109, and (2) the subsequent storing of graphics display 102 in single frame buffer 300. During this interval, graphics display 102 has not yet been stored in single frame buffer 300. If during this interval video frame 103 is updated, the region corresponding to the location of the graphics display will not be updated because these pixels will be owned by graphics application 109. Thus, for at least one frame-updating cycle, the region corresponding to graphics display 102 will contain a portion the prior video frame 103, while the rest of the single frame buffer corresponds to the new video frame 103. This causes undesirable display artifacts until graphics application 109 is able to store graphics display 102 in single frame buffer 300.
Therefore, in the known art using a dual frame buffer to overcome the problem of clobber involves excessive or wasteful memory usage. Also, use of a mask bit plane within a single frame buffer to overcome the problem of clobber can cause the above-mentioned display artifacts.
It is accordingly an object of this invention to overcome the disadvantages and drawbacks of the known art and to display graphics and video while avoiding the problems of clobber, excessive memory usage, and the above-mentioned delay and display artifacts.
Further objects and advantages of this invention will become apparent from the detailed description of a preferred embodiment which follows.